CC = gcc
CFLAGS = -O2 -Wall -I .
INCLUDE=-I../../include 
INCLUDE+=-I../../conc
LIB = -lpthread
LIB+= -lrt

all: adder tiny_multi_thread

adder: cgi-bin/adder.c 
	$(CC) $(CFLAGS) $(INCLUDE) -o cgi-bin/adder cgi-bin/adder.c 
	
tiny_multi_thread: tiny.c csapp.o sbuf.o
	$(CC) $(CFLAGS) $(INCLUDE)  -o tiny_multi_thread tiny.c csapp.o sbuf.o $(LIB) 
sbuf.o :
	$(CC) -c $(CFLAGS) $(INCLUDE) ../../conc/sbuf.c 
csapp.o:
	$(CC) $(CFLAGS) -c ../../src/csapp.c $(INCLUDE)
clean : 
	rm  tiny.o csapp.o sbuf.o sbuf.o tiny_multi_thread
